package com.caldremch.calhttp.http.bean;

import com.alibaba.fastjson.JSON;
import com.zyxr.finance.ZYXRUtilCore;

import org.json.JSONObject;


public class BaseReq {

    public BaseReq(Object data) {
        if (data instanceof JSONObject) {
            this.data = ((JSONObject) data).toString();
        } else {
            this.data = JSON.toJSONString(data);
        }
        this.currentTime = System.currentTimeMillis();
        this.checksum = ZYXRUtilCore.genCheckSum(this.data, this.currentTime);
    }

    public long currentTime;
    public String data;
    public String checksum;
}
